<?php
	
	/*
	*	详情控制器
	*	@getDetail	获取详情
	*	@display	模板文件
	*/
	
	require_once('BaseCtrl.php');

	
	class DetailCtrl extends CtrlBase {
		
		private $detail;
		
		public function __construct() {
			
			parent::__construct();
			
			parent::checkSession();
			
		}
		
		private function getDetail() {
			
			$detailModel = new DetailModel();
	
			if($this->detail = $detailModel->getDetail($_GET['id'])) {
				
				return true;
				
			}
			
			return false;
			
		}
	
		public function display() {
			
			$this->smarty->assign('title', '详情');
			
			$this->smarty->assign('welcome', '详情');
			
			if($this->getDetail()) {
			
				$this->smarty->assign('detail', $this->detail);
			
				$this->smarty->display('list_detail.tpl');
				
			}
			
		}
		
	}
?>